<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>展示ajax请求</title>
		<script src="js/jquery.min.js"></script>
	</head>
	<body>
		<div id="rtnData"></div>
		<div id="itemPrice"></div>
		<div id="itemId"></div>
	</body>
	<script>
		$().ready(function() {
			$.ajax({
				type: "POST",
				url: "",
				contentType: "application/json;charset=utf-8;",
				data: {
					"skuIds": "J_100007851351"
				},
				dateType: "jsonp",
				success: function(data) {
					$('#rtnData').text("返回数据：" + JSON.stringify(data));
					$('#itemId').text("商品编号：" + data[0].id);
					$('#itemPrice').html("商品价格：<span style='color:red'>" + data[0].p + "</span>");
				},
				error: function() {
					alert("请求失败，请联系管理员！");
				}
			})
		})
	</script>
</html>
